import { createApp } from "vue";
import { createPinia } from "pinia";

import "./styles/index.scss";
// import "element-plus/dist/index.css";
import "./permission";
import App from "./App.vue";
import router from "./router";
import { errorHandler } from "./error";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);
const store = createPinia();
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.use(router);
app.use(store);
errorHandler(app);

app.mount("#app");
